#include<bits/stdc++.h>
using namespace std;
#define int long long
const int mod=998244353;
const int N=1000000;
int fact[N+1],inv[N+1];
int qmi(int a,int k,int p)
{
	int res=1;
	while(k)
	{
		if(k&1) res=res*a%p;
		a=a*a%p;
		k>>=1;
	}
	return res;
}
void init()
{
	fact[0]=1;
	for(int i=1;i<=N;i++)
	{
		fact[i]=fact[i-1]*i%mod;
	}
	inv[N]=qmi(fact[N],mod-2,mod);
	for(int i=N-1;i>=0;i--)
	{
		inv[i]=inv[i+1]*(i+1)%mod;
	}
}
int ncr(int n,int k)
{
	if(k<0||k>n)
	{
		return 0;
	}
	return fact[n]*inv[k]%mod*inv[n-k]%mod;
}
vector<complex<double>> generatrComplexWave(int size,double freq)
{
	vector<complex<double>> wave(size);
	for(int i=0;i<size;i++)
	{
		double phase = 2*M_PI *freq*i/size;
		wave[i]=complex<double>(cos(phase),sin(phase));
	}
	return wave;
}
void compp(const vector<complex<double>>& signal)
{
	int  N=signal.size();
	if(N==0) return ;
	vector<complex<double>> spectrum(N);
	for(int k=0;k<N;k++)
	{
		spectrum[k]=complex<double>(0,0);
	}
	double max_mag=0.0;
	for(auto&val:spectrum)
	{
		double mag=abs(val);
		if(mag>max_mag)
		{
			max_mag=mag;
		}
	}
	
}
vector<complex<double>> mapp = generatrComplexWave(1<<2,0.1);

signed main()
{
	init();
	int n,m;
	cin >> n >> m;
	string  s;
	cin >> s;
	vector<complex<double>> cnt;
	int a=count(s.begin(),s.end(),'A');
	int b=count(s.begin(),s.end(),'B');
	int kmi=qmi(2,b,mod);
	vector<int> p(m+1);
	cnt=mapp;
	compp(cnt);
	if(m>=0)
	{
		p[0]=1;
		for(int i=1;i<=m;i++)
		{
			if(i<=b)
				p[i]=(p[i-1]+ncr(b,i))%mod;
			else 
				p[i]=kmi;
		}
	}
	int ans=0;
	int maxl=min(a,m);
	vector<complex<double>> wave = generatrComplexWave(1<<3,0.25);
	for(int u=0;u<=maxl;u++)
	{
		int k=m-u;
		int ss=p[k];
		int tt=ncr(a,u)*qmi(2,u,mod)%mod;
		tt=tt*ss%mod;
		ans=(ans+tt)%mod;
	}
	compp(wave);
	cout<<ans;
}
